{% extends 'base.html' %}
{% load i18n %}

{% block content %}
<div class="side">
  {% include 'user_link.html' %}
</div>
{% endblock %}

{% block footer %}
<div class="content">
  <h1 class="pic_title">
    <a href="/picture/{{ pic.key.id }}">{{ pic.title }}</a>
    <a href="/picture/{{ pic.submitted_date|date:'Y/m/d' }}/{{ pic.title }}">&para;</a>
  </h1>
  <div class="top">
    <span class="submitter">{{ pic.submitter.nickname }}</span>
    <span class="date">{{ pic.submitted_date|date:"Y.m.d" }}</span>
  </div>
  <div class="pic_caption">{{ pic.caption|linebreaks }}</div>
  <div class="tags">
    {% for tag in pic.tags %}
    {% if tag %}<a href="/tag/{{ tag }}" class="tag">{{ tag }}</a>{% endif %}
    {% endfor %}
  </div>
  <div id="disqus_thread"></div>
</div>
<div class="side">
  {% if randomized %}
  {% include "random_notification.html" %}
  {% else %}
  <span class="section_title">{{ index }} / {{ pic.album.pictures.count }}</span>
  <div class="section">
    {% if previous_pic %}<a href="/picture/{{ previous_pic.key.id }}">{% trans "previous" %}</a>{% endif %}
    {% if next_pic %}<a href="/picture/{{ next_pic.key.id }}">{% trans "next" %}</a>{% endif %}
  </div>
  {% endif %}
  <ul class="nav">
    <li><a href="/album/{{ pic.album.key.id }}">{% trans "back to" %} "{{ pic.album.name }}" </a></li>
    <li><a href="/picture/{{ pic.key.id }}?simple">{% trans "view simple" %}</a></li>
    {% ifequal user pic.submitter %}
    <li><a href="/picture/{{ pic.key.id }}/edit">{% trans "modify picture discription" %}</a></li>
    <li><a href="/picture/{{ pic.key.id }}/update">{% trans "re-upload this picture" %}</a></li>
    <li><a href="/picture/{{ pic.key.id }}/delete">{% trans "delete this picture" %}</a></li>
    {% endifequal %}
    <li>
      <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.5/cn/">
        <img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-nd/2.5/cn/80x15.png" />
      </a>
    </li>
  </ul>
</div>
<script type="text/javascript" src="/static/lomoo.js"></script>
{% if not randomized %}
<script type="text/javascript" src="http://disqus.com/forums/lomoo/embed.js"></script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=lomoo">comments powered by Disqus.</a></noscript>
<script type="text/javascript">
//<![CDATA[
(function() {
	var links = document.getElementsByTagName('a');
	var query = '?';
	for(var i = 0; i < links.length; i++) {
	if(links[i].href.indexOf('#disqus_thread') >= 0) {
		query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
	}
	}
	document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/lomoo/get_num_replies.js' + query + '"></' + 'script>');
})();
//]]>
</script>
{% endif %}
{% endblock %}
